package examples.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
public class Ticket {

	    @Id
	    private int id;
	    // valorizzato solo quando viene effettivamente venduto
	    @Temporal(TemporalType.TIMESTAMP)
	    private Date sellDate;
	    
	    @ManyToOne
	    Customer customer;
	    
	    @OneToOne
	    Seat seat;
	    
	    public int getId() {
	        return id;
	    }
	    
	    public Customer getCustomer() {
			return customer;
		}

		public void setCustomer(Customer customer) {
			this.customer = customer;
		}

		public Seat getSeat() {
			return seat;
		}

		public void setSeat(Seat seat) {
			this.seat = seat;
		}

		public void setId(int id) {
	        this.id = id;
	    }

		public Date getSellDate() {
			return sellDate;
		}

		public void setSellDate(Date sellDate) {
			this.sellDate = sellDate;
		}
	    
	}
